package a.j;

import a.c.m;
import a.c.q;
import a.c.w;
import a.e.c;
import a.j.a.j;

import java.awt.*;
import java.awt.geom.AffineTransform;
import java.awt.geom.Rectangle2D.Double;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;

public class pd
  extends od
{
  private g bb;
  private boolean cb;
  private boolean db;
  private boolean eb;
  public static int fb;
  
  public pd()
  {
    e();
  }
  
  public pd(ld paramld)
  {
    super(paramld);
    if ((bool) || ((paramld instanceof pd)))
    {
      pd localpd = (pd)paramld;
      this.bb = localpd.bb;
      this.cb = localpd.cb;
      this.db = localpd.db;
      if (bool) {
        break label68;
      }
      this.eb = localpd.eb;
      if (!ld.D) {
        return;
      }
    }
    label68:
    e();
  }
  
  private void e()
  {
    this.cb = true;
    this.db = false;
    this.eb = true;
  }
  
  public void a(boolean paramBoolean)
  {
    this.db = paramBoolean;
  }
  
  public void b(boolean paramBoolean)
  {
    this.eb = paramBoolean;
  }
  
  public boolean f()
  {
    return this.eb;
  }
  
  public boolean g()
  {
    return this.db;
  }
  
  public void f(boolean paramBoolean)
  {
    if (paramBoolean != this.cb) {
      this.cb = paramBoolean;
    }
  }
  
  public boolean h()
  {
    return this.cb;
  }
  
  public void a(g paramg)
  {
    this.bb = paramg;
  }
  
  public g i()
  {
    if (!ld.E) {
      if (this.bb != null) {
        return this.bb;
      }
    }
    try
    {
      q localq = n().g();
      j localj = j.a(localq);
      return (g)localj.o(n());
    }
    catch (Exception localException) {}
    return null;
  }
  
  protected void a(Graphics2D paramGraphics2D)
  {
    super.a(paramGraphics2D);
    if ((ld.E) || (h())) {
      k(paramGraphics2D);
    }
  }
  
  public void c(Graphics2D paramGraphics2D)
  {
    boolean bool = ld.E;
    if (!bool)
    {
      if (P()) {
        return;
      }
      super.c(paramGraphics2D);
    }
    if ((bool) || (h()))
    {
      Double localDouble = (Double)paramGraphics2D.getRenderingHint(kg.y);
      if (((bool) || (localDouble != null)) && (localDouble.doubleValue() < 1.7976931348623157E+308D)) {
        k(paramGraphics2D);
      }
    }
  }
  
  protected void k(Graphics2D paramGraphics2D)
  {
    boolean bool2 = ld.E;
    boolean bool1 = ld.D;
    g localg = i();
    if (localg == null) {
      return;
    }
    double d1 = 10.0D;
    double d2 = d() - d1 * 2.0D;
    double d3 = c() - d1 * 2.0D;
    double d4 = A();
    double d5 = B();
    jg localjg = w();
    if (!bool2) {
      switch (localjg.D())
      {
      case 1: 
        if (!bool2) {
          switch (localjg.C())
          {
          case 102: 
            d2 -= localjg.T();
            d5 += localjg.T() / 2.0D;
            if (!bool2) {
              if (!bool1) {
                break;
              }
            }
            break;
          case 101: 
            d2 -= localjg.T();
            d5 -= localjg.T() / 2.0D;
            if (!bool2) {
              if (!bool1) {
                break;
              }
            }
            break;
          case 115: 
            d3 -= localjg.S();
            d4 += localjg.S() / 2.0D;
            if (!bool2) {
              if (!bool1) {
                break;
              }
            }
            break;
          case 116: 
            d3 -= localjg.S();
            d4 -= localjg.S() / 2.0D;
          }
        }
        break;
      }
    }
    if ((bool2) || ((d3 <= 5.0D) || (d2 <= 5.0D))) {
      return;
    }
    Shape localShape = null;
    double d6 = 1.0D;
    double d7 = 1.0D;
    double d8 = 1.0D;
    AffineTransform localAffineTransform = paramGraphics2D.getTransform();
    if (g())
    {
      localShape = paramGraphics2D.getClip();
      paramGraphics2D.clip(new Rectangle2D.Double(a(), b(), d3, d2));
    }
    paramGraphics2D.translate(d4, d5);
    if (f())
    {
      Rectangle localRectangle = localg.d();
      d6 = d3 / localRectangle.getWidth();
      d7 = d2 / localRectangle.getHeight();
      d8 = Math.min(d6, d7);
      paramGraphics2D.scale(d8, d8);
      paramGraphics2D.translate(-localRectangle.getCenterX(), -localRectangle.getCenterY());
    }
    double d9 = d8 * localAffineTransform.getScaleX();
    Double localDouble = (Double)paramGraphics2D.getRenderingHint(kg.y);
    Object localObject1;
    Object localObject2;
    if ((localDouble == null) || (d9 > localDouble.doubleValue()))
    {
      localObject1 = localg.v();
      if (((w)localObject1).e()) {}
      while (bool2)
      {
        localObject2 = localg.w(((w)localObject1).d());
        ((ld)localObject2).e(paramGraphics2D);
        ((w)localObject1).f();
        if (bool2) {
          break label741;
        }
        if (bool1) {
          break label732;
        }
        if (!bool1) {
          break;
        }
      }
      localObject1 = localg.w();
    }
    while (((m)localObject1).e())
    {
      localObject2 = localg.t(((m)localObject1).a());
      ((tb)localObject2).c(paramGraphics2D);
      ((m)localObject1).f();
      if ((!bool2) && (bool1)) {
        return;
      }
      if (bool1)
      {
        if (bool2) {
          break label750;
        }
        if (localDouble != null)
        {
          if (bool2) {
            break label741;
          }
          if (4.0D * d9 <= localDouble.doubleValue()) {
            break;
          }
        }
        else
        {
          localObject1 = localg.v();
          if (((w)localObject1).e()) {}
          while (bool2)
          {
            localObject2 = localg.w(((w)localObject1).d());
            ((ld)localObject2).c(paramGraphics2D);
            ((w)localObject1).f();
            if (bool2) {
              break label741;
            }
            if (bool1) {
              break label732;
            }
            if (!bool1) {
              break;
            }
          }
          localObject1 = localg.w();
          do
          {
            if (!((m)localObject1).e()) {
              break;
            }
            localObject2 = localg.t(((m)localObject1).a());
            ((tb)localObject2).a(paramGraphics2D);
            ((m)localObject1).f();
            if ((!bool2) && (bool1)) {
              return;
            }
          } while (!bool1);
        }
      }
    }
    label732:
    if (!bool2)
    {
      if (g()) {
        label741:
        paramGraphics2D.setClip(localShape);
      }
      label750:
      paramGraphics2D.setTransform(localAffineTransform);
    }
  }
  
  public ld a(ld paramld)
  {
    return new pd(paramld);
  }
  
  public void a(ObjectOutputStream paramObjectOutputStream)
    throws IOException
  {
    paramObjectOutputStream.writeByte(0);
    super.a(paramObjectOutputStream);
    paramObjectOutputStream.writeBoolean(this.cb);
    paramObjectOutputStream.writeBoolean(this.db);
    paramObjectOutputStream.writeBoolean(this.eb);
  }
  
  public void a(ObjectInputStream paramObjectInputStream)
    throws IOException, ClassNotFoundException
  {
    if (!ld.E) {}
    switch (paramObjectInputStream.readByte())
    {
    case 0: 
      super.a(paramObjectInputStream);
      this.cb = paramObjectInputStream.readBoolean();
      this.db = paramObjectInputStream.readBoolean();
      this.eb = paramObjectInputStream.readBoolean();
      if (!ld.D) {
        break;
      }
    default: 
      throw new c();
    }
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.j.pd

 * JD-Core Version:    0.7.0.1

 */